package com.yyg.boot.web;

import com.yyg.boot.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Description Description
 * @Author 一一哥Sun
 * @Date Created in 2020/3/25
 */
@Controller
public class HelloController {

    @Autowired
    private User user;

    @GetMapping("/show")
    public String show(Model model) {
        model.addAttribute("user", user);
        //ftl代表FreeMarker的模板;index是模板名称.
        return "ftl/index";
    }

}
